﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nancy.Responses.Negotiation;
using Nancy;

namespace NancyApp
{
    public static class NegotiateExtensions
    {
        public static Negotiator ForJson(this Negotiator negotiator, object model)
        {
            return negotiator.WithMediaRangeModel(MediaRange.FromString("application/json"), model);
        }

        public static Negotiator ForXml(this Negotiator negotiator, object model)
        {
            return negotiator.WithMediaRangeModel(MediaRange.FromString("application/xml"), model);
        }
    }
}